﻿using System;

namespace winS.Unity
{
    /// <summary>
    /// 附加该特新的方法将被 <see cref="Runtime.Initialize"/> 调用
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, Inherited = false)]
    public class RuntimeInitializeMethodAttribute : Attribute
    {
        internal int priority;

        /// <summary>
        /// 运行时初始化方法
        /// </summary>
        /// <param name="priority">调用优先级. 优先级越小, 越先被调用</param>
        public RuntimeInitializeMethodAttribute(int priority = 0)
        {
            this.priority = priority;
        }
    }
}